Atomic deletion of database data categories

ABSTRACT

A device may maintain, in a database, a plurality of data items, each data item of the plurality of data items being associated with a respective category and supplemental information relating to deletion of the data item. The device may associate a group of counters with at least one of the categories and receive a deletion request corresponding to one of the group of categories, the deletion request including the supplemental information. The device may identify a counter associated with the category corresponding to the deletion request based on the supplemental information. The device may then increment the identified counters and selectively delete the data items based on values of the counters.

RELATED APPLICATIONS

This application claims priority from and is a continuation-in-part(CIP) of U.S. patent application Ser. No. 12/637,930, filed Dec. 15,2009, entitled “ATOMIC DELETION OF DATABASE CATEGORIES,” the disclosureof which is incorporated herein by reference.

BACKGROUND

Database management systems (DBMSs) organize the storage of data. DBMSscontrol the creation, maintenance and use of data structures stored intheir databases. Database data structures are typically stored in memoryor on hard disk in one of many forms, including ordered or unorderedflat files, heaps, hash buckets, B+ trees or Indexed Sequential AccessMethod (ISAM) structures. Databases typically conduct databasetransactions by enforcing one or more of four rules: atomicity,consistency, isolation and durability. The atomicity rule requires thatall tasks in a transaction must be performed, or that none of the tasksin the transaction should be performed. The consistency rule requiresthat every transaction preserves the integrity constraints of thedatabase. The isolation rule requires that two simultaneous transactionsnot interfere with one another (i.e., intermediate results within atransaction are not visible to other transactions). The durability rulerequires that completed transactions not be aborted or their resultsdiscarded.

Interface for Metadata Access Points (IF-MAP) is a protocol thatprovides a standardized framework for network and security devices topublish device data, such as, for example, Internet Protocol (IP)address or authentication data, to a central repository that can be usedby other applications. The central repository can be used for security,asset management, discovery, or other purposes. The central repository,thus, acts as a DBMS that manages data related to network and securitydevices. Data published to the IF-MAP repository may be labeled with anidentifier of the publisher that published the data to the repository.The IF-MAP protocol then permits a publisher to subsequently purge(i.e., delete) previously published material using, for example, apurgePublisher request. Data from the repository labeled with thepublisher's identifier must be deleted in response to the issuance of aIF-MAP purgePublisher request. A publisher may desire to purge publisheddata due to, for example, a system failure, a system re-start or anetwork disconnection event associated with the publisher.

SUMMARY

One implementation is directed to a computing-device implemented methodthat includes maintaining, by a data access point, data items, each dataitem of the data items being associated with a respective category ofthe data item and supplemental information relating to deletion of thedata item. The method may further include associating a number ofcounters with at least one of the categories and receiving a deletionrequest corresponding to one of the categories, the deletion requestincluding the supplemental information. The method may further includeidentifying, in response to the deletion request, one or more of thecounters associated with the category corresponding to the deletionrequest, the identification being performed based on the supplementalinformation included with the deletion request and incrementing theidentified counters. The method may further include selectivelydeleting, by the data access point, one or more of the data items basedon values of the number of counters.

Another implementation is directed to a device that includes a memory tostore instructions and a processor to execute the instructions. Theprocessor may execute the instructions to maintain a database; connectto client devices that publish information to the database; and store,in the database, data items published by the client devices, each of thedata items being associated with supplemental information relating todeletion of the data items and a deletion count value. The processor mayfurther execute the instructions to maintain categories corresponding tothe data items; maintain counters corresponding to each of thecategories, at least some of the categories being associated with thecounters; receive a deletion request corresponding to a first of thecategories, the deletion request including the supplemental information;identify, for the deletion request for the first category, and based onthe supplemental information, one or more of the counters; increment theidentified counters; and selectively delete one or more of the dataitems based on values of the counters.

In yet another possible implementation, a computer-readable medium maycontain instructions executable by at least one processor. Thecomputer-readable medium may include instructions to maintain a numberof data items, each data item being associated with a respectivecategory of the data item and supplemental information relating todeletion of the data item; instructions to associate counters with atleast one of the categories; instructions to receive a deletion requestcorresponding to one of the categories, the deletion request includingthe supplemental information; and instructions to identify, in responseto the deletion request, one or more of the counters associated with thecategory corresponding to the deletion request, the identification beingperformed based on the supplemental information included with thedeletion request. The computer-readable medium may further includeinstructions to increment the identified counters and instructions toselectively delete one or more of the data items based on values of thecounters.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate one or more embodiments describedherein and, together with the description, explain the invention. In thedrawings,

FIG. 1A is a diagram of an exemplary network in which systems andmethods described herein may be implemented;

FIG. 1B is a diagram of exemplary interactions between a client and thedata access point of FIG. 1A;

FIG. 2 is a diagram of components of an exemplary device that maycorrespond to the clients and/or data access point of FIG. 1B;

FIG. 3 is a diagram of a first exemplary table that may be stored in thedatabase of FIG. 1A;

FIG. 4 is a diagram of a second exemplary table that may be stored inthe database of FIG. 1A;

FIG. 5 is a flow chart that illustrates an exemplary process forcategorizing and storing an item of data in the database of FIG. 1A;

FIG. 6 is a flow chart that illustrates an exemplary process forreceiving a category deletion request and for performing garbagecollection with respect to data stored in the database of FIG. 1A;

FIG. 7 is a flow chart that illustrates an exemplary garbage collectionprocess for deleting data stored in the database of FIG. 1A; and

FIG. 8 is a flow chart that illustrates an exemplary process forresponding to an item query received at the data access point of FIG.1A;

FIG. 9 is a diagram illustrating a data item table according to a secondexample embodiment;

FIG. 10 illustrates a category table according to the second exampleembodiment;

FIG. 11 is a flow chart that illustrates an example process forcategorizing and storing an item of data received by a data accesspoint;

FIG. 12 is a flow chart that illustrates an example process for deletinga category;

FIG. 13 is a flow chart that illustrates an example process forperforming garbage collection;

FIG. 14A is a diagram illustrating an entry in a table that includes asession/indefinite supplemental parameter;

FIG. 14B is a diagram illustrating an entry in a category table; and

FIG. 15 is a flow chart of an example process for handling categorydeletion for session/indefinite lifetime data.

DETAILED DESCRIPTION

The following detailed description refers to the accompanying drawings.The same reference numbers may be used in different drawings to identifythe same or similar elements. Also, the following detailed descriptiondoes not limit the invention. Instead, the scope of the invention isdefined by the appended claims and equivalents.

Exemplary embodiments described herein implement mechanisms foratomically deleting categories of data from a database. As describedherein, a counter value, which maintains a current count representingthe quantity of times a given category has been deleted, is used whendeciding whether to delete items of data that are associated with thecategory. A category, as referred to herein, includes a label thatidentifies a set of related data items. When a new item of data isreceived for storing in the database, where the item of data isassociated with a category, a current count, representing the quantityof times that a particular category has been deleted, is incremented andthe new value is stored in the database. Individual data items may thenbe selected for deletion from the database by comparing the new value ofthe count, that represents the quantity of times that the category hasbeen deleted, with the previously stored count associated with each itemof data. Subsequently, when a deletion request is received for thecategory, a current count, representing the quantity of times that thecategory has been deleted, is obtained at that particular instant intime, and compared to the previously stored count associated with theitem of data. If the current count is greater than the previously storedcount, then the item of data may be deleted from memory during a garbagecollection process. This garbage collection process may be repeated foreach data item stored in the memory that is associated with the samecategory.

Exemplary Network

FIG. 1A depicts an exemplary network 100 in which systems and methodsdescribed herein may be implemented. Network 100 may include multipleclients 110-1 through 110-N, a network 120, a data access point 130, anda database 140. Clients 110-1 through 110-N, and data access point 130,may connect to network 120 via wired or wireless links

Each of clients 110-1 through 110-N (collectively referred to herein as“clients 110,” or generically referred to herein as “client 110”) mayinclude a server (e.g., a rack mounted server), a computer (e.g.,laptop, desktop or palmtop), a cellular radiotelephone, a personaldigital assistant (PDA), or a Personal Communications Systems (PCS)terminal. In some embodiments, one or more of clients 110 may include aserver entity that may interact with data access point 130 via network120.

Network 120 may include one or more networks of any type, including alocal area network (LAN); a wide area network (WAN); a metropolitan areanetwork (MAN); a telephone network such as a Public Switched TelephoneNetwork (PSTN) or a Public Land Mobile Network (PLMN); a satellitenetwork; an intranet; the Internet; or a combination of networks. ThePLMN may further include a packet-switched network, such as, forexample, a General Packet Radio Service (GPRS) network, a CellularDigital Packet Data (CDPD) network, or a Mobile IP network.

Data access point 130 may include a server entity or device that mayreceive update requests from clients 110-1 through 110-N for storingdata items in database 140. Upon receipt of such update requests, dataaccess point 130 may store the requested data item(s) in database 140,as described in further detail below. Data access point 130 may furtherreceive query requests for accessing data items stored in database 140.Upon receipt of such requests, data access point 130 may access andretrieve the requested data item(s) from database 140 and return them tothe requesting one of clients 110. Data access point 130 may alsoreceive category deletion requests from clients 110-1 through 110-N.Upon receipt of a category deletion request, data access point 130 maydelete data items from database 140 that correspond to the category thathas been requested to be deleted.

Database 140 may include any type of existing database that may storedata for retrieval by data access point 130. Data access point 130 may,for example, interact with database 140 to store data items receivedfrom clients 110-1 through 110-N, may retrieve previously stored dataitems from database 140, and may delete data items associated with oneor more categories.

The number of devices depicted in FIG. 1A is exemplary. Fewer, or more,devices than those shown may be included in network 100. Operationsdescribed herein as being performed by one device in network 100 may beperformed by one or more other devices.

FIG. 1B graphically depicts exemplary interactions between a client(e.g., client 110-1) and data access point 130. As shown, client 110-1may publish 150 a data item(s) to data access point 130. Publishing of adata item(s) to data access point 130 enables data access point 130 tostore the data item(s) in database 140 for modification and/or retrievalby any of clients 110-1 through 110-N. Client 110-1 may further send adata query 160 to data access point 130 for retrieving a specific dataitem(s) from database 140. Client 110-1 may also send a categorydeletion request 170 to data access point 130 for deleting an entirecategory of data items stored in database 140. In an embodiment in whichdatabase 140 is serving as an IF-MAP repository, a given category mayinclude an identifier of the publisher that published the data item(s)to the repository (e.g., a unique identifier of a respective one ofclients 110). In such an IF-MAP embodiment, the category deletionrequest may correspond to an IF-MAP purgePublisher request.

Interactions, other than those shown in FIG. 1B, may occur betweenclients 110 and data access point 130.

Exemplary Network Device

FIG. 2 is a diagram of components of a device 200 according to anexemplary embodiment. Device may correspond to each of clients 110-1through 110-N, and data access point 130. Device 200 may include a bus210, a processor 220, a main memory 230, a read only memory (ROM) 240, astorage device 250, input device(s) 260, output device(s) 270, and acommunication interface 280. Bus 210 may include a path that permitscommunication among the components of device 200.

Processor 220 may include, for example, a processor, microprocessor,and/or processing logic that may interpret and execute instructions. Insome implementations, processor 220 may include multiple processors(e.g., parallel processors). Main memory 230 may include a random accessmemory (RAM) or another type of dynamic storage device that may storeinformation and instructions for execution by processor 220. ROM 240 mayinclude a ROM device or another type of static storage device that maystore static information and instructions for use by processor 220.Storage device 250 may include a magnetic and/or optical recordingmedium and its corresponding drive. Storage device 250 may furtherinclude a solid state drive.

Input device(s) 260 may include one or more mechanisms that permit anoperator to input information to device 200, such as a keyboard, amouse, a pen, voice recognition and/or biometric mechanisms, etc. Outputdevice(s) 270 may include one or more mechanisms that output informationto the operator, including a display, a printer, a speaker, etc.Communication interface 280 may include any transceiver-like mechanismthat enables device 200 to communicate with other devices and/orsystems. For example, communication interface 280 may include mechanismsfor communicating with another device or system via network 120.

Device 200 may perform certain operations or processes, as will bedescribed in detail below. Device 200 may perform these operations inresponse to processor 220 executing software instructions contained in acomputer-readable medium, such as memory 230. A computer-readable mediummay be defined as a physical or logical memory device. A logical memorydevice may include memory space within a single physical memory deviceor spread across multiple physical memory devices.

The software instructions may be read into memory 230 from anothercomputer-readable medium, such as storage device 250, or from anotherdevice via communication interface 280. The software instructionscontained in memory 230 may cause processor 220 to perform operations orprocesses that will be described later. Alternatively, hardwiredcircuitry may be used in place of or in combination with softwareinstructions to implement processes consistent with the principles ofthe invention. Thus, exemplary implementations are not limited to anyspecific combination of hardware circuitry and software.

Exemplary Data Item Table

FIG. 3 illustrates a data item table 300 according to an exemplaryembodiment. Data item table 300 may be stored in database 140. Data itemtable 300 may include multiple entries 310, each of which may include adata item field 320, and an item deletion count field 340. Entries 310may include additional, and/or different, fields than those depicted inFIG. 3.

Data item field 320 may store a specific item of data received from aclient 110. The item of data may include any type of data. For example,the item of data may include any type of data published using the IF-MAPprotocol, such as information about other equipment and users in thenetwork published by a client 110. In one implementation, client 110 mayinclude a login server that decides whether to permit another computerto log-in to a network, and subsequently publishes information about thelog-in computer (or the user of the log-in computer). A category may beassociated with each corresponding data item stored in item field 320.The category may, for example, identify a set of related data items. Inan IF-MAP protocol embodiment, for example, the category may include anidentifier of the publisher, which published the data item stored initem field 320, to database 140. One or more items of data stored initem fields 320 of table 300 may, therefore, be associated with acategory. Item deletion count field 340 may include a count of how manytimes a category had been deleted at a point in time in which the dataitem stored in item field 320 was received for storage in table 300. Insome embodiments (not shown), there may be several versions of a samedata item, with each version being labeled with a different value initem deletion count field 340.

Exemplary Category Table

FIG. 4 illustrates a category table 400 according to an exemplaryembodiment. Category table 400 may be stored in database 140. Categorytable 400 may include multiple entries 410, each of which may include acategory field 420 and a category deletion count field 430. Entries 410may include additional, and/or different, fields than those depicted inFIG. 3.

Category field 420 may store an identifier that identifies a category ofdata stored in database 140. Each category may identify a set of relateddata items that are stored in a respective item field 320 of table 300.Category deletion count field 430 may store a value representing thequantity of times the category, identified in category field 420 of acorresponding entry 410, has been deleted. Each time a deletion requestis received for a category identified in category field 420, a countervalue, stored in category deletion count field 430, may be incremented.

Exemplary Process for Categorizing and Storing an Item of Data

FIG. 5 is a flow chart that illustrates an exemplary process forcategorizing and storing an item of data received by data access point130 from a client 110. The exemplary process of FIG. 5 may beimplemented by data access point 130. In other embodiments, some or allof the blocks described below may be performed by another device or acombination of devices.

The exemplary process may include receiving an item of data (block 500).For example, as shown in FIG. 1B, data access point 130 may receive apublish request 150 that includes an item of data to be published (i.e.,stored and made available to clients 110-1 through 110-N) in database140. One of clients 110 may send publish request 150 to data accesspoint 130 via network 120.

A category of the received item of data may be determined (block 510).The category of the received data item may be determined by extractingdata from the data item, or from data related to the data item, or bycomputing a function of the data item. The function may include any typeof function that may operate upon the data item to compute a category.In some embodiments, the category of the received item of data may beextracted from the publish request 150 received from a client 110. In anIF-MAP embodiment, for example, publish request 150 may include apublisher identifier (ID) that identifies client 110 that sent the itemof data for storage, and this publisher ID may be extracted from publishrequest 150 and used as the category of the received item of data.

A current count that represents a number of times that the category hasbeen deleted may be obtained and set as an item deletion count for theitem of data (block 520). The category determined in block 510 may bematched with a category stored in category field 420 of table 400. Acategory deletion count from field 430 of the entry 410, in which thematching category field 420 is identified, may be retrieved from table400. The retrieved category deletion count may then be set as the itemdeletion count for the item of data.

The item of data may be labeled with the obtained item deletion count(block 530). In one embodiment, the labeling may include storing theobtained deletion count in the corresponding item deletion count 340 oftable 300.

Exemplary Category Deletion and Garbage Collection Process

FIGS. 6 and 7 are flow charts that illustrate an exemplary process fordeleting a category and for performing garbage collection. The exemplaryprocess of FIGS. 6 and 7 may be implemented by data access point 130. Inother embodiments, some or all of the blocks described below may beperformed by another device or a combination of devices.

The exemplary process may include receiving a deletion request for anidentified category (block 600). A client 110 may send a deletionrequest, which identifies a particular category, to data access point130 via network 120. Referring to FIG. 1B, for example, client 110-1 maysend category deletion request 170 to data access point 130. Categorydeletion request 170 may include an identifier of a category. In oneembodiment, the category identifier may include a unique identifierassociated with client 110 that published the data items that arealready associated with the category in database 140. Additionally, thedeletion request may occur when it is determined that data access point130 has lost contact with one of clients 110-1 through 110-N. Upon aloss of contact with one of clients 110-1 through 110-N, a deletionrequest may be considered to have been received by data access point 130for a corresponding category.

The identified category's deletion count may be incremented (block 610).Table 400 may be searched to identify an entry, where the identifier incategory field 420 matches the category identifier contained in thedeletion request. The corresponding category deletion count field 430for the entry may be retrieved, incremented, and then re-stored in thesame category deletion count field 430.

Garbage collection may be performed (block 620). The garbage collectionprocess may traverse through stored data items in table 300 to compareeach data item's item deletion count with the count value stored in theidentified category's category deletion count 430. If the comparisonindicates that the count value stored in the identified category'scategory deletion count field 430 is greater than the data item's countvalue stored in the item deletion count field 340, then the data itemmay be deleted from table 300. Further exemplary details of the garbagecollection process are described below with respect to FIG. 7.

The garbage collection process may begin with the identification of anext stored data item (block 700). During the first occurrence of block700 in the garbage collection process, the next stored data item may bea first data item stored in database 140. Various techniques may be usedfor identifying a data item in table 300. In one embodiment, table 300may be sequentially searched to process each stored data itemcorresponding to an entry 310. In another embodiment, table 300 may beindexed by category, so that members of a category that have had theirdeletion counts incremented can be found relatively quickly.

The data item's category and item deletion count may be determined(block 710). The contents of item deletion count field 340 of the dataitem identified in block 700 may be retrieved from table 300. Thecategory of the data item identified in block 700 may be determined byextracting data from the data item, or from data related to the dataitem, or by computing a function of the data item. The function mayinclude any type of function that may operate upon the data item tocompute a category (i.e., the same function used in block 510 above). Insome embodiments, the category of the received item of data may beextracted from the original publish request 150 received from a client110. In an IF-MAP embodiment, for example, publish request 150 mayinclude a publisher identifier (ID) that identifies client 110 that sentthe item of data for storage, and this publisher ID may be extractedfrom publish request 150 and used as the category of the received itemof data. The category's category deletion count may be obtained (block720). The determined category from block 710 may be used to identify amatching category in an entry 410 in category field 420 of table 400.The contents of the corresponding category deletion count field 430 maythen be retrieved.

A determination may be made whether the obtained category deletion countis greater than the item deletion count (block 730). A comparison may bemade between the counter value stored in item deletion count field 340retrieved in block 710 and the counter value stored in category deletioncount field 430 retrieved in block 720. If the category deletion countis greater than the item deletion count (block 730—YES), then the itemof data may be deleted (block 750). For example, if the counter valuestored in the category deletion count field 430 retrieved in block 720is greater than the counter value stored in the item deletion countfield 340 retrieved in block 710, then the corresponding data itemstored in item field 320 may be deleted, along with fields 330 and 340.The exemplary process may then continue at block 740.

It may be determined whether there are more data items remaining (block740). If there are no more data items remaining (block 740—NO), then theexemplary process may end. If there are more data items remaining (block740—YES), then the exemplary process may continue at block 700 with theidentification of a next stored data item.

The exemplary process of blocks 700 through 750 may be repeated for eachdata item stored in table 300. Subsequent to completion of blocks700-750 for each data item in table 300, the garbage collection processof block 620 may complete to finish the exemplary deletion requestprocess of FIG. 6.

Exemplary Item Query Process

FIG. 8 is a flow chart that illustrates an exemplary process forreceiving an item query from client 110. The exemplary process of FIG. 8may be implemented by data access point 130. In other embodiments, someor all of the blocks described below may be performed by another deviceor a combination of devices.

The exemplary process may include the receipt of an item query (block800). A client 110 may send an item query to data access point 130 toseek to retrieve a specific data item(s) from database 140. An itemdeletion count for the queried item may be retrieved (block 810). Thedata item identified in the item query may be compared to the content ofitem fields 320 in table 300 to identify an entry 310 of table 300 whosecontent matches this item. The contents of the corresponding itemdeletion count 340, of the identified entry 310, may then be retrieved.A category for the data item may be determined (block 820). The categoryof the data item may be determined by extracting data from the dataitem, or from data related to the data item, or by computing a functionof the data item. The function may include any type of function that mayoperate upon the data item to compute a category.

A current category deletion count for the determined category may beretrieved (block 830). Table 400 may be searched to locate an entry 410whose category field 420 content matches the contents of category field330 retrieved in block 820. The counter value stored in categorydeletion count field 430 for the identified entry 410 may be retrieved.

The category deletion count and the item deletion count may be compared(block 840). For example, the counter value stored in category deletionfield 430, retrieved in block 830, may be compared with the countervalue stored in item deletion count field 340, retrieved in block 810.

If the comparison of block 840 indicates that the category deletioncount is less than or equal to the item deletion count (block 850—YES),then the queried data item may be retrieved and returned (block 860).The contents of item field 320 for entry 310, identified in block 810,may be retrieved and returned to the requesting client 110. If thecomparison of block 840 indicates that the category deletion count isgreater than the item deletion count (block 850—NO), then the querieddata item may be hidden (block 870). A queried data item may be “hidden”by making the data item non-retrievable from table 300 in response to anitem query, even though the queried item may still be stored in table300. However, the queried data item may otherwise be retrievable forother processing until deleted in block 750 of FIG. 7 of the garbagecollection process.

Atomic Deletion Using Multiple Counters

In the above description of the atomic deletion of data items associatedwith a category, each category was described as being associated with asingle counter (e.g., category field 420 is associated with categorydeletion count field 430). The category of a particular data item may bederived from the data item itself, such as, for data item 320, anidentifier of the publisher included within the data item. As describedin more detail below, in some implementations, multiple counters may beimplemented for a particular category. The choice of which of themultiple counters to use for a particular data item may be based, forexample, on the data item and also based on other supplementalinformation associated with the data item.

FIG. 9 illustrates a data item table 900 according to a second exampleembodiment. Data item table 900 may be stored in database 140. Data itemtable 900 may include multiple entries 910, each of which may include adata item 920, an item deletion count field 930, and a supplementalparameter field 940. Entries 910 may include additional, and/ordifferent, fields than those depicted in FIG. 9.

Data item 920 may store a specific item of data received from a client110. The item of data may include any type of data. For example, theitem of data may include any type of data published using the IF-MAPprotocol, such as information about other equipment and users in thenetwork published by a client 110. In one implementation, client 110 mayinclude a log-in server that decides whether to permit another computerto log-in to a network, and subsequently publishes information about thelog-in computer (and/or the user of the log-in computer). Data item 920may include information that identifies, or can be used to identify, thecategory to which the data item belongs. For example, in an IF-MAPprotocol embodiment, a “publisher-id” may be extracted from data item920. The publisher-id may be relevant to a category associated with dataitem 920 (e.g., the category may be equivalent to the publisher-id).

Item deletion count field 930 may include a value of a counterassociated with the entry 910 at a point in time in which thecorresponding data item 920 was last stored or updated in table 900. Thevalue of the counter may represent how many times the categoryassociated with entry 910 was deleted at the point in time in which thecorresponding data item 920 was last stored or updated in table 900.

Supplemental parameter 940 may include additional information receivedfrom client 110 relevant to deletion of the entry 910. In oneimplementation, the information represented by supplemental parameter940 may be predetermined by data access point 130. In an alternativeimplementation, clients 110 may customize supplemental parameter 940. Inone particular implementation, supplemental parameter 940 may representa lifetime associated with the corresponding data item 920. The lifetimemay be either a “session” lifetime, which may indicate that the dataitem is to be deleted when the client's communication session with dataaccess point 130 ends, or an “indefinite” lifetime, which may indicatethat the data item is to be retained when the client's communicationsession with data access point 130 ends.

FIG. 10 illustrates a category table 1000 according to the secondexample embodiment. Category table 1000 may be stored in database 140.Category table 1000 may include multiple entries 1010, each of which mayinclude a category field 1020 and one or more deletion counters,illustrated as category deletion count fields 1040-1 through 1040-N.Entries 1010 may include additional, and/or different, fields than thosedepicted in FIG. 10.

For category deletion count fields 1040, in the case in which N=1,category deletion count field 1040-1 may be equivalent to categorydeletion count field 430 from the first embodiment. Updates to entries910 (i.e., publish requests) and category deletion requests, as well asbeing associated with a particular category 1020, may also be associatedwith a particular category deletion count field 1040. Conceptually, acategory and a category deletion count field 1040 for a request maytogether define one or more “sub-categories” for a client.

Category field 1020 may store an identifier that identifies a categoryof data stored by data access point 130. As mentioned, each data item920 may correspond to a category 1020. In one implementation, eachcategory may represent a client. When implementing the IF-MAP protocol,for instance, network devices may publish information, such asinformation relating to capabilities of the network devices, to dataaccess point 130. In this situation, each network device that writesinformation to data access point 130 may correspond to a category.

Category deletion count fields 1040 may each store a counter valuerepresenting the quantity of times a deletion request corresponding to aparticular category deletion count field has been received. Deletion ofa category may correspond to the deletion of all entries 910 that matchthe category and in which the information in supplemental parameterfield 940 matches the deletion request. Deletion of a category should bean atomic operation. Each time a category deletion request is receivedthat corresponds to category deletion count for a category identified incategory field 1020, the counter value, stored in the corresponding oneof category deletion count fields 1040, may be incremented.

FIG. 11 is a flow chart that illustrates an example process forcategorizing and storing an item of data received by data access point130 from a client 110 for the second embodiment. The example process ofFIG. 11 may be implemented by data access point 130. In otherembodiments, some or all of the blocks described below may be performedby another device or a combination of devices, including or excludingdata access point 130.

The process may include receiving (either remotely or from a localsource) an item of data (block 1100). For example, as shown in FIG. 1B,data access point 130 may receive a publish request 150 that includes anitem of data to be published (i.e., stored and made available to clients110-1 through 110-N). One of clients 110 may send publish request 150 todata access point 130 via network 120. A supplemental parameterassociated with the item of data may be received (block 1110). Thesupplemental parameter may include information relevant to how the itemof data is to be deleted. For example, in an IF-MAP implementation,certain clients may desire that published data items be maintainedindefinitely by data access point 130. These data items may be said tohave “indefinite” lifetimes. Other clients may desire that publisheddata items only be available in data access point 130 while the clientis connected to data access point 130. These data items may be said tohave “session” lifetimes.

The process may further include determining a counter that applies tothe data item (block 1120). The determination of the counter may bebased on the received data item itself and based on the supplementalparameter. The determined counter may correspond to one of categorydeletion count fields 1040. For example, assume that the supplementalparameter was a bit representing “session lifetime” or “indefinitelifetime.” In this case, there may be two category deletion count fields(e.g., N=2) for each category; one for session lifetime data items fromthe client (e.g., category deletion count field 1040-1) and one forindefinite lifetime data items for the client (e.g., category deletioncount field 1040-2).

In some implementations, the function to apply to map the data item andthe supplemental parameter to the counter may be predetermined by dataaccess point 130. Alternatively, data access point 130 may accept custommapping functions from clients 110, such as a custom categorizationprogram or plugin, that may be created and uploaded by clients 110. Dataaccess point 130 may apply the uploaded custom categorization program toimplement block 1120.

The process may further include obtaining the count value for thedetermined counter (block 1130). The count value may be obtained byreading the value from the category deletion count field 1040, asdetermined in block 1020.

The process may further include storing the received item of data,including the supplemental parameter and the count value (block 1140).The data item may be stored as an entry 910 in table 900, in which thedata item is stored in item field 920, the count value is stored in itemdeletion count field 930, and the supplemental parameter is stored insupplemental parameter field 940.

FIGS. 12 and 13 are flow charts that illustrate an example process fordeleting a category and for performing garbage collection for the secondexample embodiment. The example process of FIGS. 12 and 13 may beimplemented by data access point 130. In other embodiments, some or allof the blocks described below may be performed by another device or acombination of devices, including or excluding data access point 130.

The example process may include receiving a deletion request for acategory (block 1200). A client 110 may send a deletion request, whichidentifies a particular category, to data access point 130 via network120. The deletion request may also include a supplemental parameterwhich may correspond to the supplemental parameter previously sent byclient 110 when publishing data items. Referring to FIG. 1B, forexample, client 110-1 may send category deletion request 170 to dataaccess point 130. Category deletion request 170 may include anidentifier of a category and a supplemental parameter. In oneembodiment, the category identifier may include a unique identifierassociated with client 110 that published the data items that arealready associated with the category in data access point 130. Thesupplemental parameter may include a bit to indicate whether sessionlifetime or indefinite lifetime data items are to be deleted. In someimplementations, client 110 may not transmit a supplemental parameter.This may indicate that any data item corresponding to a category are tobe deleted regardless of the supplemental parameter associated with thedata item.

In one implementation, which is described in more detail below, thedeletion request, instead of being sent by a client 110, may beautomatically generated by data access point 130. For example, in animplementation in which the supplemental parameter indicates sessionlifetime data, the deletion request may be generated by data accesspoint 130 when a client loses contact with data access point 130.

The process may further include identifying the counter(s) correspondingto the deletion request (block 1210). The counters may be identifiedusing the process applied in block 1120 (FIG. 11) when determining thecounter that applies to a data item. The counters corresponding to thedeletion request may be a function of the information identifying thecategory and the supplemental parameter. In some situations, such aswhen no supplemental parameter is received in block 1200, all of thecounters for the category may be identified.

The process may further include incrementing the identified counters(block 1220). Incrementing a counter may include reading the value ofthe counter (i.e., reading the values in the identified categorydeletion count fields 1040), incrementing the value, and writing theincremented value back to the category deletion count field 1040.

Garbage collection may be performed (block 1230). The garbage collectionprocess may traverse through stored data items to compare each dataitem's item deletion count with the count value stored in the countercorresponding to the data item. If the comparison indicates that thecount value stored in the counter is greater than the data item's countvalue stored in the item deletion count field 930, then the data itemmay be deleted from table. Further exemplary details of the garbagecollection process are described below with respect to FIG. 13.

The garbage collection process may begin with the identification of anext stored data item (block 1300). During the first occurrence of block1300 in the garbage collection process, the next stored data item may bea first data item stored by data access point 130. Various techniquesmay be used for identifying a data item in table 900. In one embodiment,table 900 may be sequentially searched to process each stored data itemcorresponding to an entry 910. In another embodiment, table 900 may beindexed by category, so that members of a category that have had theirdeletion counts incremented can be found relatively quickly. The dataitem (i.e., from data item field 920) and the supplemental parameter(i.e., from supplemental parameter field 940) may then be read (block1310).

The process may further include determining the counter that applies tothe data item (block 1320). This determination may be identical to thatperformed in block 1120 (FIG. 11). The determined counter may correspondto one of category deletion count fields 1040.

The process may further include determining whether the counter value(from block 1320) is greater than the item deletion count of the dataitem (block 1330). If so (block 1330—YES), the data item may be deletedfrom table 900 (block 1350). Deletion of a data item may includedeletion of the entire entry 910 from table 900.

The process may additionally include determining if additional dataitems remain in table 900 (block 1340). If there are no more data itemsremaining (block 1340—NO), then the process may end. If there are moredata items remaining (block 1340—YES), then the process may continue atblock 1300 with the identification of a next stored data item.

Blocks 1300 through 1340 may be repeated for each data item stored intable 900 to complete a garbage collection process.

Example Implementation in which the Supplemental Parameter Indicates theLifetime of the Data Item

As mentioned above, in one possible implementation, supplementalparameter 940 may be a parameter that determines whether a data item hasa session lifetime, indicating that the data item should be deleted whenthe publisher loses contact with data access point 130, or an indefinitelifetime, indicating that the data item should be maintained after theclient's session with data access point 130 is over. Additional detailsrelating to this implementation will now be described.

FIG. 14A illustrates an entry 1410 in a table, such as table 900, inwhich entry 1410 includes a session/indefinite supplemental parameter.Data item 1410 may include supplemental parameter field 1440, itemdeletion count field 1430, and item field 1420, which may each besimilar to supplemental parameter field 940, item deletion count field930, and item field 920, respectively, of entry 1910 (FIG. 9).Supplemental parameter 1410 may be, for example, a one-bit valueindicating whether entry 1410 is a session lifetime data item or anindefinite lifetime data item.

FIG. 14B illustrates an entry 1460 in a category table, such as categorytable 1000. Entry 1410 may include category field 1470, categorydeletion count session field 1475, and category deletion countindefinite field 1480. Category field 1470 may store an identifier thatidentifies a category of data stored by data access point 130. Eachcategory may correspond to a client that has published data items todatabase 140.

Category deletion count session field 1475 may store a valuerepresenting the quantity of times a deletion request has been receivedin which the deletion request is for the category stored in categoryfield 1470 and that is applicable to session lifetime data items.Category deletion count indefinite field 1475 may store a valuerepresenting the quantity of times a deletion request has been receivedin which the deletion request is for the category stored in categoryfield 1470 and that is applicable to indefinite lifetime data items.

When a data item is received by database 140 that includes asession/indefinite supplemental parameter, the data item may be storedin item field 1420, and the session/lifetime state of the data item maybe stored in supplemental parameter field 1440. Depending on thesession/lifetime state of the data item, item deletion count field 1430may be set to be equal to the value in category deletion count sessionfield 1475 or category deletion count indefinite field 1480.

FIG. 15 is a flow chart of an example process for handling categorydeletion for session/indefinite lifetime data. The exemplary process ofFIG. 15 may be implemented by data access point 130. In otherembodiments, some or all of the blocks described below may be performedby another device or a combination of devices, including or excludingdata access point 130.

The exemplary process may include determining if a “loss of contact” hasoccurred with a client associated with an identified category in table1000 (block 1500). Data access point 130 may determine if a loss ofcontact has occurred with any of clients 110 that are associated withany category stored in a category field 1460 in table 1000. Loss ofcontact may be determined by, for example, a communication sessionending or timing-out with a client 110. If a loss of contact hasoccurred, the identified category's “session” deletion count (categorydeletion count session field 1475) may be incremented (block 1510). Forexample, if a loss of contact has occurred with a client 110 associatedwith a particular first category 1020 in table 1000, category deletioncount session field 1475 of the corresponding entry of table 1000 may beincremented (block 1510).

It may be determined if a deletion request for an identified categoryhas been received (block 1520). A client 110 may send a deletion requestto data access point 130 via network 120. In one embodiment, thedeletion request may identify the client 110 that published the dataitems.

The client's “indefinite” and “session” deletion counts may beincremented (block 1530). Table 1000 may be searched to identify anentry 1410 that corresponds to the client. The corresponding categorydeletion count fields 1475 and 1480 for the entry may be retrieved,incremented, and then re-stored in the respective fields 1475 and 1480.

Garbage collection may be performed (block 1540). Garbage collection maybe performed in response incrementing the client's indefinite andsession deletion counts (block 1530) or in response to incrementing anidentified category's session deletion count (block 1510).Alternatively, garbage collection may be performed based on some otherevent, such as a period timer. The garbage collection process maytraverse through stored data items in table 900 to compare each dataitem's item deletion count with the count value stored in the identifiedcategory's “session” or “indefinite” deletion count fields 1475 and1480. If the comparison indicates that the count value stored in theidentified category's deletion count fields 1475 and 1480 is greaterthan the data item's count value stored in item deletion count field1430, then the data item may be deleted from table 900 during thegarbage collection process, such as that described previously withrespect to FIG. 13.

Conclusion

As described herein, categories of data may be deleted in an atomicfashion from a database. The atomic category deletion process, asdescribed herein, uses a counter value, which represents a number oftimes that a given category has been deleted, when deciding whether todelete items of data that are associated with a category that is beingprocessed for deletion. The exemplary embodiments described herein maybe applied, for example, to purgePublisher requests in the IF-MAPprotocol, where the categories of data that are deleted correspond tosets of data items that are labeled with a same publisher identifier.

In a second example embodiment, multiple counters may be implemented fora category. The choice of which of the multiple counters to use for aparticular data item may be based, for example, on the data item andalso based on other supplemental information associated with the dataitem. The atomic category deletion process may determine whether todelete items of data for a category based on both the category and thesupplemental information. In one particular implementation, a categorymay correspond to a particular client and the supplemental informationmay correspond to whether a data item published by the client has anindefinite lifetime or a session lifetime.

The foregoing description of embodiments described herein providesillustration and description, but is not intended to be exhaustive or tolimit the embodiments described herein to the precise form disclosed.Modifications and variations are possible in light of the aboveteachings or may be acquired from practice of the invention. Forexample, certain portions have been described as executed asinstructions by one or more processing units. However, implementations,other than software implementations, may be used, including, forexample, hardware implementations, such as application specificintegrated circuits, field programmable gate arrays, or combinations ofhardware and software.

While series of blocks have been described in FIGS. 5-8 and 11-15 theorder of the blocks may vary in other implementations. Also,non-dependent blocks may be performed in parallel. Even thoughparticular combinations of features are recited in the claims and/ordisclosed in the specification, these combinations are not intended tolimit the invention. In fact, many of these features may be combined inways not specifically recited in the claims and/or disclosed in thespecification. For example, the isolation rule (i.e., rule that otheroperations cannot access the data in an intermediate state during atransaction) may be implemented in some embodiments. To achieveisolation, every transaction may begin by taking a “point-in-time”snapshot of the item deletion counts (i.e., from item deletion countfield 340), and when a data item is queried from database 140, thesnapshot of the item deletion counts may be used rather than the mostcurrent item deletion counts. In this way, a category deletion thathappens after the “point-in-time” snapshot, but before the transactionfinishes, will not affect the transaction. The transaction may include,for example, an update/publish or a query.

Exemplary embodiments have been described herein with respect to storinga single category and a single item deletion count in association witheach data item in table 300 of database 140. However, in otherembodiments, each item can belong to n categories, where the ncategories form a hierarchy. In such embodiments, when storing a dataitem in table 300, the category is stored in association with the dataitem that is the farthest from the root of the hierarchy. Then, todelete a category, the category's category deletion count isincremented, and the category deletion counts of all the category'sdescendants in the hierarchy are also incremented.

Exemplary embodiments have further been described herein as usingdeletion counts (e.g., item deletion count 340, category deletion count430) for performing garbage collection. In other embodiments, other“monotonic” values (i.e., values that are always increasing) may beused. For example, in one embodiment, monotonic time stamps could beused instead of the deletion counts. In such an embodiment, an itemcould be garbage if its timestamp is greater than the category'stimestamp.

No element, act, or instruction used in the description of the presentapplication should be construed as critical or essential to theinvention unless explicitly described as such. Also, as used herein, thearticle “a” is intended to include one or more items. Where only oneitem is intended, the term “one” or similar language is used. Further,the phrase “based on” is intended to mean “based, at least in part, on”unless explicitly stated otherwise. The scope of the invention isdefined by the claims and their equivalents.

1. A computing-device implemented method comprising: maintaining, by adata access point, a plurality of data items, each data item of theplurality of data items being associated with a respective category ofthe data item and supplemental information relating to deletion of thedata item; associating, by the data access point, a plurality ofcounters with at least one of the categories; receiving, by the dataaccess point, a deletion request corresponding to one of the pluralityof categories, the deletion request including the supplementalinformation; identifying, by the data access point and in response tothe deletion request, one or more of the plurality of countersassociated with the category corresponding to the deletion request, theidentification being performed based on the supplemental informationincluded with the deletion request; incrementing, by the data accesspoint, values of the identified counters; and selectively deleting, bythe data access point, one or more of the data items, of the pluralityof data items, based on values of the plurality of counters.
 2. Themethod of claim 1, where selectively deleting the one or more of thedata items includes: associating a deletion count with each of theplurality of data items; determining, for each of the plurality of dataitems and based on the supplemental information for each of the dataitems, one of the plurality of counters that corresponds to the selecteddata item; and deleting the data item when the counter that correspondsto the data item has a value greater than the deletion count of the dataitem.
 3. The method of claim 2, where the deletion count associated witheach of the plurality of data items is set to a value equal to a valueof the counter that corresponds to the data item when the data item ispublished or updated by a client connecting to the data access point. 4.The method of claim 2, where determining the one of the plurality ofcounters that corresponds to the selected data item includes:determining the one of the plurality of counters based on a functionapplied to the data item and the supplemental information.
 5. The methodof claim 4, where the function applied to the data item and supplementalinformation includes a predefined function or a custom function uploadedfrom a client device.
 6. The method of claim 1, where the supplementalinformation defines whether a data item has an indefinite lifetime or asession lifetime.
 7. The method of claim 1, further comprising:determining the respective category by extracting data from the dataitem.
 8. The method of claim 1, where receiving the deletion requestincludes generating the deletion request by the data access point inresponse to a client device losing contact with the data access point.9. The method of claim 1, where receiving the deletion request includesreceiving the deletion request from a client device that publishesinformation to the data access point.
 10. A device, comprising: a memoryto store instructions; and a processor to execute the instructions to:maintain a database; connect to a plurality of client devices thatpublish information to the database; store, in the database, a pluralityof data items published by the client devices, each of the data itemsbeing associated with supplemental information relating to deletion ofthe data items and a deletion count value; maintain categoriescorresponding to the plurality of data items; maintain counterscorresponding to each of the categories, at least some of the categoriesbeing associated with a plurality of counters; receive a deletionrequest corresponding to a first of the categories, the deletion requestincluding the supplemental information; identify, for the deletionrequest for the first category, and based on the supplementalinformation, one or more of the counters; increment the identifiedcounters; and selectively delete one or more of the plurality of dataitems based on values of the counters.
 11. The device of claim 10, wherewhen selectively deleting the one or more of the data items, theprocessor is to execute the instructions to: associate a deletion countwith each of the plurality of data items; determine, for a selected oneof the plurality of data items and based on the supplemental informationfor the selected one of the plurality of data items, one of theplurality of counters that corresponds to the selected data item; anddelete the selected data item when the counter that corresponds to theselected data item has a value greater than the deletion count of theselected data item.
 12. The device of claim 11, where when determiningthe one of the plurality of counters that corresponds to the selecteddata item, the processor is to execute instructions to: determine theone of the plurality of counters based on a function applied to the dataitem and the supplemental information.
 13. The device of claim 12, wherethe function applied to the data item and supplemental informationincludes a predefined function or a custom function uploaded from one ofthe client devices.
 14. The device of claim 10, where the supplementalinformation defines whether a data item has an indefinite lifetime or asession lifetime.
 15. The device of claim 10, where the processorfurther executes the instructions to: determine the category of a dataitem based on information extracted from the data item.
 16. The deviceof claim 10, where, when receiving the deletion request, the processoris to execute instructions to: generate the deletion request in responseto one of the client devices losing contact with the device.
 17. Thedevice of claim 10, where, when receiving the deletion request, theprocessor is to execute instructions to receive the deletion requestfrom one of the client devices that publishes information to the device.18. The device of claim 10, where the device includes an access pointfor the Interface for Metadata Access Points (IF-MAP) protocol.
 19. Acomputer-readable medium containing instructions executable by at leastone processor, the computer-readable medium comprising: instructions tomaintain a plurality of data items, each data item of the plurality ofdata items being associated with a respective category of the data itemand supplemental information relating to deletion of the data item;instructions to associate a plurality of counters with at least one ofthe categories; instructions to receive a deletion request correspondingto one of the plurality of categories, the deletion request includingthe supplemental information; instructions to identify, in response tothe deletion request, one or more of the plurality of countersassociated with the category corresponding to the deletion request, theidentification being performed based on the supplemental informationincluded with the deletion request; instructions to increment theidentified counters; and instructions to selectively delete one or moreof the data items, of the plurality of data items, based on values ofthe plurality of counters.
 20. The computer-readable medium of claim 19,further comprising instructions to: associate a deletion count with eachof the plurality of data items; determine, for each of the plurality ofdata items and based on the supplemental information for each of thedata items, one of the plurality of counters that applies to theselected data item; and delete the data item when the counter thatapplies to the data item has a value greater than the deletion count ofthe data item.